(function(window){
	var Subject_lessonCtrl = {
		data:{},
		init: function(data){
			this.bindEven();
        },
		
		 bindEven: function(){
            var bindings = [{
               // element:document,
                element:'.learnchapter h3',
                event:hiApp.device.click,
                handler: this.show_lesson
            }
			];
            bindEvents(bindings);
        },
		
		show_lesson:function(obj){
			var html=$(obj).html();
			if(typeof(html)=="undefined"){
				obj=$(this);
			}
			$(obj).parent().find(".unstyled").toggle(400);
			 if($(obj).parent().find(".unstyled").css("display")=="none"){
				$(obj).find("span").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
			}else{	 
				$(obj).find("span").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");	 
			}

		}
		
    };
		
	window.BoxEdu_Subject_lessonCtrl = Subject_lessonCtrl;
						
})(window);